import api from '@/api/index.js'

export default {
    //获取用户详情
    GET_USER_INFO({commit},userId) {
        return new Promise((resolve,reject) => {
            api.getUserDetail({uid:userId}).then(res => {
                if(res.code == 200) {
                    commit('SET_USER_INFO',res.profile)
                    
                }
                resolve(res)
            }).catch(err =>{
                reject(err)
            })
        })
    }
}